const vistTypeList = [
  {
    id: 0,
    name: '访问',
    color: 'gray'
  },
  {
    id: 1,
    name: '浏览',
    color: 'green'
  },
  {
    id: 2,
    name: '下单页',
    color: 'red'
  },
  {
    id: 3,
    name: '信息填写',
    color: 'red'
  },
  {
    id: 4,
    name: '订单提交',
    color: 'red'
  },
  {
    id: 10,
    name: '姓名填写',
    color: 'red'
  },
  {
    id: 11,
    name: '手机填写',
    color: 'red'
  },
  {
    id: 12,
    name: '地址填写',
    color: 'red'
  },
  {
    id: 13,
    name: '备注填写',
    color: 'red'
  },
]

const copyTypeList = [
  {
    id: 0,
    name: '否',
  },
  {
    id: 1,
    name: '是'
  }
]

const getVisitTypeName = (id, prop = 'name') => {
    const result = vistTypeList.find(item => item.id === id)
    return result ? result[prop] : ''
}

const getCopyTypeName = (id, prop = 'name') => {
    const result = copyTypeList.find(item => item.id === id)
    return result ? result[prop] : ''
}

export {
  vistTypeList,
  getVisitTypeName,
  getCopyTypeName
}
